#include"Prime.h"
int main()
{
	int a = 0;
	int b = 0;
	cin >> a >> b;
	int count = 0;
	for (size_t i = a; i < b; i++)
	{
		if (isPrime(i))
		{
			count++;
		}
	}
	cout << count;
	return 0;
}